<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="weaver.general.Util" %>
<jsp:useBean id="rs" class="weaver.conn.RecordSet" scope="page"/>
<jsp:useBean id="bb" class="weaver.general.BaseBean"/>
<%
    String cgxqid = Util.null2String( request.getParameter( "cgxqid" ) );//项目名称
    String cglx = Util.null2String( request.getParameter( "cglx" ) );//采购类型
    JSONObject jsonData = new JSONObject();
    String tableDtl = "";
    switch (cglx){
        case"0":tableDtl="formtable_main_682"; break;
        case"1":tableDtl="formtable_main_685"; break;
        case"2":tableDtl="formtable_main_687"; break;
        case"3":tableDtl="formtable_main_688"; break;
        case"4":tableDtl="formtable_main_690"; break;
    }
    rs.executeQuery("select min(jhsj) from "+tableDtl+" where id in ("+cgxqid+") and jhsj is not null");
    if(rs.next()){
        String jhsj = Util.null2String(rs.getString(1));
        jsonData.put( "flag",true );
        jsonData.put( "jhsj",jhsj );
    }else {
        jsonData.put( "flag",false );
    }
    out.print( jsonData.toJSONString());
    bb.writeLog( "getDbqcsj_Ajax=" + jsonData.toJSONString() );
%>


